<!-- 
 * category on menu-left
 * @author: ThanhTran
 * @since 2014-11-08
  -->
<div id="menu-left">
	<div id="wrapper">
	    <ul class="menu">
	        	<?php $rootCategories = $this->requestAction('/RootCategories/view');
				if (!isset($root_category)){
					$root_category = 0;
				}
				if(!isset($category_id)){
					$category_id = 0;
				}
	        	?>
	        	<?php foreach ($rootCategories as $rootCategory): ?>
	        		<li class="item1"><a href="" class="<?php echo $rootCategory['RootCategory']['id'] == $root_category ? 'active' : ''?>"> 
	        		<?php echo $rootCategory['RootCategory']['category_name'];?>
	        		</a>	        		 
        		 	<ul class="menu-child" style="display: none">
        		 		<?php foreach ($rootCategory['Category'] as $category): ?>
        		 		<li class="subitem1">
        		 			<a href="/<?php echo $rootCategory['RootCategory']['short_link'];?>/<?php echo $category['short_link'];?>"  class="<?php echo $category['category_id'] == $category_id ? 'active' : ''?>">
        		 			<?php echo $category['category_name'];?>
        		 			</a>
        		 			<?php endforeach ?>
        		 		</a></li>        
        		 	</ul>
	        		</li>
	        	<?php endforeach ?>
				
	    </ul>
     	<ul class="menu-click">
     		<li class="item1"><a href="/search">Các rao vặt mới</a></li>
			<li class="item1"><a href="/shop">Gian hàng</a></li>
		</ul>
	</div>
</div>